{% extends "base.html" %}

{% block title %}添加课程 - 课程管理系统{% endblock %}

{% block content %}
    <h1>添加新课程</h1>
    
    <form method="post" action="{{ url_for('create_course_html') }}">
        <div class="form-group">
            <label for="name">课程名称 *</label>
            <input type="text" id="name" name="name" required minlength="1" maxlength="100">
        </div>
        <div class="form-group">
            <label for="credit">学分 *</label>
            <input type="number" id="credit" name="credit" step="0.5" min="0.5" max="10.0" required>
        </div>
        <div class="actions">
            <button type="submit" class="btn btn-primary">保存课程</button>
            <a href="{{ url_for('get_courses_html') }}" class="btn btn-secondary">取消</a>
        </div>
    </form>
{% endblock %}